// 关联住户门卡管理
import {
    ajaxPostBack,
    ajaxPost
} from '@/utils/data/request'

// 列表
export function list(params: any) {
    return ajaxPostBack("device/scrip-holder-list", params, {
        cookies: ['yard_sn']
    })
}

// 新增
export function add(params: any) {
    return ajaxPost("device/scrip-holder-create", params, { successMessage: true, cookies: ['yard_sn'] })
}

// 续期
export function renewal({ scrip_sn, group_arr, end_time }: any) {
    return ajaxPost("device/scrip-renew", { scrip_sn, group_arr, end_time }, { successMessage: true, cookies: ['yard_sn'] })
}

// 删除
export function del({ scrip_sn }: any) {
    return ajaxPost("device/scrip-delete", { scrip_sn }, { successMessage: true, cookies: ['yard_sn'] })
}

// 启用/禁用
export function status(params: any) {
    return ajaxPost("device/scrip-change-status", params, { successMessage: true, cookies: ['yard_sn'] })
}
